package com.tuanzi.loan.vo.response.family;

import com.tuanzi.loan.core.vo.IdentityResponse;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;

@Data
@EqualsAndHashCode(callSuper = true)
public class SwitchListSearchResponse extends IdentityResponse {
	private String parentProductId;
	private String switchModule;
	private String switchName;
	private ArrayList<Integer> productIds = new ArrayList<>();

	public SwitchListSearchResponse(String parentProductId, String switchModule, String switchName) {
		super.setId(String.format("%s-%s-%s", parentProductId, switchModule, switchName));
		this.parentProductId = parentProductId;
		this.switchModule = switchModule;
		this.switchName = switchName;
	}

	public void addProductId(Integer productId) {
		productIds.add(productId);
	}
}
